import request from "@/utils/request"

//列表查询
export const queryClazzApi = 
    (name,begin,end,page,pageSize) => 
    request.get(`/clazzs?name=${name}&begin=${begin}&end=${end}&page=${page}&pageSize=${pageSize}`)


// 新增班级信息
export const addClazzApi = (clazz) => request.post('/clazzs',clazz)


// 编辑班级信息
// 1.根据id查询班级信息
export const queryClazzByIdApi = (id) => request.get(`/clazzs/${id}`)


// 2.编辑信息
export const updateClazzApi = (clazz) => request.put('/clazzs',clazz)


// 删除数据
// 根据id删除单个班级
export const delClazzByIdApi = (id) => request.delete(`/clazzs/${id}`)

// 查询全部班级
export const findAllClazzApi = () => request.get('/clazzs/list')